/*
 * SQLUsuarioDAO.java
 *
 * Created on 7 de noviembre de 2007, 18:44
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package webportlet.model.usuario.dao;

import java.sql.Connection;
import webportlet.model.usuario.dto.UsuarioDTO;
import webportlet.model.util.DuplicateInstanceException;
import webportlet.model.util.InstanceNotFoundException;
import webportlet.model.util.InternalErrorException;

/**
 *
 * @author Alvarete
 */
public interface SQLUsuarioDAO {
    
    public void create(Connection connection, UsuarioDTO usuario)
        throws DuplicateInstanceException, InternalErrorException;
        
    public boolean exists(Connection connection, String nickName)
        throws InternalErrorException;
        
    public UsuarioDTO find(Connection connection, String nickName)
        throws InstanceNotFoundException, InternalErrorException;
        
    public void update(Connection connection, UsuarioDTO usuario) 
        throws InstanceNotFoundException, InternalErrorException;
        
    public void remove(Connection connection, String nickName) 
        throws InstanceNotFoundException, InternalErrorException;
    
}
